
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>体温填报</title>
    <link rel="icon" href="/static/favicon.ico" type="image/ico">
    <meta name="keywords" content="体温填报">
    <meta name="description" content="体温填报">
    <meta name="author" content="yinqi">
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/layui/css/layui.css" rel="stylesheet">
    <link href="/static/css/materialdesignicons.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/js/jconfirm/jquery-confirm.min.css">
    <link href="/static/css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <aside class="lyear-layout-sidebar">

            <!-- logo -->
            <div class="lyear-layout-sidebar-scroll">

                <nav class="sidebar-main">
                    <ul class="nav nav-drawer">
                        <li class="nav-item nav-item-has-subnav">
                            {{if .IsLogin}}
                                <a href="/"><i class="mdi mdi-account"></i> 体温提交</a>
                                <a href="{{urlfor "TmpController.Get"}}"><i class="mdi mdi-account"></i> 员工体温信息查询</a>
                                <a href="{{urlfor "StaffController.Get"}}"><i class="mdi mdi-account"></i> 员工信息</a>
                            {{else}}
                                <a href="/"><i class="mdi mdi-account"></i> 体温提交</a>
                            {{end}}
                        </li>
                    </ul>
                </nav>
            </div>

        </aside>
        <!--End 左侧导航-->

        <!--头部信息-->
        <header class="lyear-layout-header">

            <nav class="navbar navbar-default">
                <div class="topbar">

                    <div class="topbar-left">
                        <div class="lyear-aside-toggler">
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                        </div>
                        <span class="navbar-page-title">体温填报</span>
                    </div>
                    {{if .IsLogin}}
                        <ul class="topbar-right">
                            <li class="dropdown dropdown-profile">
                                <a href="javascript:void(0)" data-toggle="dropdown">
                                    <span> Test<span class="caret"></span></span>
                                </a>
                                <ul class="dropdown-menu dropdown-menu-right">
                                    <li class="divider"></li>
                                    <li> <a href="{{urlfor "UserController.Logout"}}"><i class="mdi mdi-logout-variant"></i> 退出登陆</a> </li>
                                </ul>
                            </li>
                        </ul>
                    {{else}}
                        <ul class="topbar-right">
                            <li class="dropdown dropdown-profile">
                                <a href="javascript:void(0)" data-toggle="dropdown">
                                    <span> 信息查询登陆<span class="caret"></span></span>
                                </a>
                                <ul class="dropdown-menu dropdown-menu-right">
                                    <li class="divider"></li>
                                    <li> <a href="{{urlfor "UserController.Get"}}"><i class="mdi mdi-logout-variant"></i> 登陆</a> </li>
                                </ul>
                            </li>
                        </ul>
                    {{end}}

                </div>
            </nav>

        </header>
    <!--页面主要内容-->
    <main class="lyear-layout-content">
        <div class="container-fluid">
          <div class="row">
            <div class="card">
              <div class="card-header">员工体温信息查询</div>
            <div class="input-group m-b-10">
                <span class="input-group-addon mdi mdi-update"> 选择查询日期</span>
                <input class="js-datepicker m-10" type="text" id="riqixuanze" name="riqixuanze" placeholder="{{.ctime}}" value="{{.ctime}}" data-date-format="yyyy-mm-dd">

                <button type="submit" class="btn btn-success btn-w-md" onclick="SearchTmp();">查询</button>
            </div>
            <div>
                <table class="layui-hide" id="test"></table>
            </div>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script src="/static/layui/layui.all.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/static/js/main.min.js"></script>
<script src="/static/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/static/js/messagebox.js"></script>
<!--时间选择插件-->
<script src="/static/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/static/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/static/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/static/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/static/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script type="text/javascript">
    SearchTmp = function() {
        layer.msg('查询中', {shade:0.4, time:0})
        data = {
            'riqixuanze':$("#riqixuanze").val(),
        };
        console.log(data);
        $.post("{{urlfor "TmpController.GetTmp"}}",data,function (ipitem) {
            if(ipitem.status){
                layer.close(layer.msg());
                layer.msg(ipitem.msg);

                console.log(ipitem.data)
                layui.use('table', function () {
                    var table = layui.table;
                    table.render({
                        elem: '#test'
                        ,toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板
                        ,defaultToolbar: ['filter', 'exports', 'print']
                        ,title:'体温信息{{.ctime}}'
                        ,limit: 1000
                        , cols: [[
                            {field: 'Name', title: '姓名'}
                            , {field: 'Temperature', title: '体温', sort: true}
                            , {field: 'Value1', title: '身体是否发热', sort: true}
                            , {field: 'Value2', title: '是否咳嗽', sort: true}
                            , {field: 'Value3', title: '是否感冒', sort: true}
                            , {field: 'Value4', title: '是否呼吸困难', sort: true}
                            , {field: 'Value5', title: '是否接触过疑似病例', sort: true}
                            , {field: 'Value6', title: '是否去过湖北', sort: true}
                            , {field: 'Value7', title: '是否接触过湖北接触人员', sort: true}
                            , {field: 'Value8', title: '5月30日后共同生活的家庭成员中去过北京高、中风险区域及北京新发地', sort: true}
                            , {field: 'Value9', title: '5月30日后本人去过北京高、中风险区域', sort: true}
                            , {field: 'ReportTime', title: '提交时间', sort: true}
                        ]],
                        data: ipitem.data
                    });
                });
            }else{
                layer.close(layer.msg());
                console.log(ipitem.data)
                layer.msg(ipitem.data)
            }
        })

    }
</script>
</body>
</html>